using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for HOADONNHAPKHO.
     /// </summary>
     public class HOADONNHAPKHO
    {
              private string _MAHOADONNHAP;
      private decimal _THANHTIENCHUACK_HD;
      private decimal _CHIETKHAUTHEOTIEN_HD;
      private decimal _SOTIENTHANHTOAN_HD;
      private decimal _SOTIENCHI;
      private Int32 _LOAIHOADON;
      private DateTime _HANTHANHTOAN;
      private string _GHICHU_HD;
      private bool _DATHANHTOAN;
      private string _NGUOITAO;
      private DateTime _NGAYTAOHOADON;
      private bool _ISDELETE;
      private Int32 _MANHACUNGCAP;
      private Int32 _MACA;
      private HOADONHAPKHOCHITIETList _listHOADONHAPKHOCHITIET;
      private PHIEUCHIList _listPHIEUCHI;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMAHOADONNHAPNullable
      { get { return false;  } }
      public string MAHOADONNHAP
      {
         get { return _MAHOADONNHAP; }
         set { _MAHOADONNHAP = value; }
      }
      public bool IsTHANHTIENCHUACK_HDNullable
      { get { return true;  } }
      public decimal THANHTIENCHUACK_HD
      {
         get { return _THANHTIENCHUACK_HD;  }
         set { _THANHTIENCHUACK_HD = value; }
      }
      public bool IsCHIETKHAUTHEOTIEN_HDNullable
      { get { return true;  } }
      public decimal CHIETKHAUTHEOTIEN_HD
      {
         get { return _CHIETKHAUTHEOTIEN_HD;  }
         set { _CHIETKHAUTHEOTIEN_HD = value; }
      }
      public bool IsSOTIENTHANHTOAN_HDNullable
      { get { return true;  } }
      public decimal SOTIENTHANHTOAN_HD
      {
         get { return _SOTIENTHANHTOAN_HD;  }
         set { _SOTIENTHANHTOAN_HD = value; }
      }
      public bool IsSOTIENCHINullable
      { get { return true;  } }
      public decimal SOTIENCHI
      {
         get { return _SOTIENCHI;  }
         set { _SOTIENCHI = value; }
      }
      public bool IsLOAIHOADONNullable
      { get { return true;  } }
      public Int32 LOAIHOADON
      {
         get { return _LOAIHOADON;  }
         set { _LOAIHOADON = value; }
      }
      public bool IsHANTHANHTOANNullable
      { get { return true;  } }
      public DateTime HANTHANHTOAN
      {
         get { return _HANTHANHTOAN;  }
         set { _HANTHANHTOAN = value; }
      }
      public bool IsGHICHU_HDNullable
      { get { return true;  } }
      public string GHICHU_HD
      {
         get { return _GHICHU_HD;  }
         set { _GHICHU_HD = value; }
      }
      public bool IsDATHANHTOANNullable
      { get { return true;  } }
      public bool DATHANHTOAN
      {
         get { return _DATHANHTOAN;  }
         set { _DATHANHTOAN = value; }
      }
      public bool IsNGUOITAONullable
      { get { return true;  } }
      public string NGUOITAO
      {
         get { return _NGUOITAO;  }
         set { _NGUOITAO = value; }
      }
      public bool IsNGAYTAOHOADONNullable
      { get { return true;  } }
      public DateTime NGAYTAOHOADON
      {
         get { return _NGAYTAOHOADON;  }
         set { _NGAYTAOHOADON = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }
      public bool IsMANHACUNGCAPNullable
      { get { return true;  } }
      public Int32 MANHACUNGCAP
      {
         get { return _MANHACUNGCAP;  }
         set { _MANHACUNGCAP = value; }
      }
      public bool IsMACANullable
      { get { return true;  } }
      public Int32 MACA
      {
         get { return _MACA;  }
         set { _MACA = value; }
      }
public HOADONHAPKHOCHITIETList HOADONHAPKHOCHITIETList 
{ 
	get { return _listHOADONHAPKHOCHITIET; }
	set { _listHOADONHAPKHOCHITIET = value;}
}
public PHIEUCHIList PHIEUCHIList 
{ 
	get { return _listPHIEUCHI; }
	set { _listPHIEUCHI = value;}
}

        #endregion

        #region Constructors
        public HOADONNHAPKHO()
        {
            Reset();
        }
        public HOADONNHAPKHO(HOADONNHAPKHO obj)
        {
            	this._MAHOADONNHAP = obj.MAHOADONNHAP;
	this._THANHTIENCHUACK_HD = obj.THANHTIENCHUACK_HD;
	this._CHIETKHAUTHEOTIEN_HD = obj.CHIETKHAUTHEOTIEN_HD;
	this._SOTIENTHANHTOAN_HD = obj.SOTIENTHANHTOAN_HD;
	this._SOTIENCHI = obj.SOTIENCHI;
	this._LOAIHOADON = obj.LOAIHOADON;
	this._HANTHANHTOAN = obj.HANTHANHTOAN;
	this._GHICHU_HD = obj.GHICHU_HD;
	this._DATHANHTOAN = obj.DATHANHTOAN;
	this._NGUOITAO = obj.NGUOITAO;
	this._NGAYTAOHOADON = obj.NGAYTAOHOADON;
	this._ISDELETE = obj.ISDELETE;
	this._MANHACUNGCAP = obj.MANHACUNGCAP;
	this._MACA = obj.MACA;
        }
        #endregion

        public void Reset()
        {
                     _MAHOADONNHAP = EmptyValues.v_string;
         _THANHTIENCHUACK_HD = EmptyValues.v_decimal;
         _CHIETKHAUTHEOTIEN_HD = EmptyValues.v_decimal;
         _SOTIENTHANHTOAN_HD = EmptyValues.v_decimal;
         _SOTIENCHI = EmptyValues.v_decimal;
         _LOAIHOADON = EmptyValues.v_Int32;
         _HANTHANHTOAN = EmptyValues.v_DateTime;
         _GHICHU_HD = EmptyValues.v_string;
         _DATHANHTOAN = EmptyValues.v_bool;
         _NGUOITAO = EmptyValues.v_string;
         _NGAYTAOHOADON = EmptyValues.v_DateTime;
         _ISDELETE = EmptyValues.v_bool;
         _MANHACUNGCAP = EmptyValues.v_Int32;
         _MACA = EmptyValues.v_Int32;
	_listHOADONHAPKHOCHITIET = null;
	_listPHIEUCHI = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MAHOADONNHAP"] is DBNull))
		{
			obj.MAHOADONNHAP = (string)reader["MAHOADONNHAP"];
		}
                if(!(reader["THANHTIENCHUACK_HD"] is DBNull))
		{
			obj.THANHTIENCHUACK_HD = (decimal)reader["THANHTIENCHUACK_HD"];
		}
                if(!(reader["CHIETKHAUTHEOTIEN_HD"] is DBNull))
		{
			obj.CHIETKHAUTHEOTIEN_HD = (decimal)reader["CHIETKHAUTHEOTIEN_HD"];
		}
                if(!(reader["SOTIENTHANHTOAN_HD"] is DBNull))
		{
			obj.SOTIENTHANHTOAN_HD = (decimal)reader["SOTIENTHANHTOAN_HD"];
		}
                if(!(reader["SOTIENCHI"] is DBNull))
		{
			obj.SOTIENCHI = (decimal)reader["SOTIENCHI"];
		}
                if(!(reader["LOAIHOADON"] is DBNull))
		{
			obj.LOAIHOADON = (Int32)reader["LOAIHOADON"];
		}
                if(!(reader["HANTHANHTOAN"] is DBNull))
		{
			obj.HANTHANHTOAN = (DateTime)reader["HANTHANHTOAN"];
		}
                if(!(reader["GHICHU_HD"] is DBNull))
		{
			obj.GHICHU_HD = (string)reader["GHICHU_HD"];
		}
                if(!(reader["DATHANHTOAN"] is DBNull))
		{
			obj.DATHANHTOAN = (bool)reader["DATHANHTOAN"];
		}
                if(!(reader["NGUOITAO"] is DBNull))
		{
			obj.NGUOITAO = (string)reader["NGUOITAO"];
		}
                if(!(reader["NGAYTAOHOADON"] is DBNull))
		{
			obj.NGAYTAOHOADON = (DateTime)reader["NGAYTAOHOADON"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
                if(!(reader["MANHACUNGCAP"] is DBNull))
		{
			obj.MANHACUNGCAP = (Int32)reader["MANHACUNGCAP"];
		}
                if(!(reader["MACA"] is DBNull))
		{
			obj.MACA = (Int32)reader["MACA"];
		}
//            _MAHOADONNHAP = (reader["MAHOADONNHAP"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["MAHOADONNHAP"];
//            _THANHTIENCHUACK_HD = (reader["THANHTIENCHUACK_HD"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["THANHTIENCHUACK_HD"];
//            _CHIETKHAUTHEOTIEN_HD = (reader["CHIETKHAUTHEOTIEN_HD"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["CHIETKHAUTHEOTIEN_HD"];
//            _SOTIENTHANHTOAN_HD = (reader["SOTIENTHANHTOAN_HD"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOTIENTHANHTOAN_HD"];
//            _SOTIENCHI = (reader["SOTIENCHI"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["SOTIENCHI"];
//            _LOAIHOADON = (reader["LOAIHOADON"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["LOAIHOADON"];
//            _HANTHANHTOAN = (reader["HANTHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["HANTHANHTOAN"];
//            _GHICHU_HD = (reader["GHICHU_HD"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GHICHU_HD"];
//            _DATHANHTOAN = (reader["DATHANHTOAN"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["DATHANHTOAN"];
//            _NGUOITAO = (reader["NGUOITAO"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOITAO"];
//            _NGAYTAOHOADON = (reader["NGAYTAOHOADON"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYTAOHOADON"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
//            _MANHACUNGCAP = (reader["MANHACUNGCAP"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MANHACUNGCAP"];
//            _MACA = (reader["MACA"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MACA"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(string MAHOADONNHAP, decimal THANHTIENCHUACK_HD, decimal CHIETKHAUTHEOTIEN_HD, decimal SOTIENTHANHTOAN_HD, decimal SOTIENCHI, Int32 LOAIHOADON, DateTime HANTHANHTOAN, string GHICHU_HD, bool DATHANHTOAN, string NGUOITAO, DateTime NGAYTAOHOADON, bool ISDELETE, Int32 MANHACUNGCAP, Int32 MACA)
        {
                     this._MAHOADONNHAP = MAHOADONNHAP;
         this._THANHTIENCHUACK_HD = THANHTIENCHUACK_HD;
         this._CHIETKHAUTHEOTIEN_HD = CHIETKHAUTHEOTIEN_HD;
         this._SOTIENTHANHTOAN_HD = SOTIENTHANHTOAN_HD;
         this._SOTIENCHI = SOTIENCHI;
         this._LOAIHOADON = LOAIHOADON;
         this._HANTHANHTOAN = HANTHANHTOAN;
         this._GHICHU_HD = GHICHU_HD;
         this._DATHANHTOAN = DATHANHTOAN;
         this._NGUOITAO = NGUOITAO;
         this._NGAYTAOHOADON = NGAYTAOHOADON;
         this._ISDELETE = ISDELETE;
         this._MANHACUNGCAP = MANHACUNGCAP;
         this._MACA = MACA;
        }
    }
}